package com;

import com.utils.SpringContextUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationContext;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@ServletComponentScan
@SpringBootApplication(scanBasePackages = "com")
public class CheckApplication implements WebMvcConfigurer {

	public static void main(String[] args) {
		//把ApplicationContext注入到SpringContextUtil中，以便通过util拿到spring容器中的bean
		ApplicationContext app = SpringApplication.run(CheckApplication.class, args);
		SpringContextUtil.setApplicationContext(app);
	}
}
